package com.baixun.gasentity.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * @program: 上海燃气驾驶舱
 * @description: 实体类映射到数据库中的表sys_device
 * @author: yesong
 **/
@Data
@ApiModel(description = "设备实体类，存储设备信息")
@TableName("sys_device")
public class SysDevice implements Serializable {

    @TableId
    @ApiModelProperty(value = "设备 ID，唯一标识", example = "1")
    private Long deviceId;

    @ApiModelProperty(value = "关联的点位 ID，表示设备所在的点位", example = "123")
    private Long pointId;

    @ApiModelProperty(value = "设备名称", example = "摄像头A")
    private String deviceName;

    @ApiModelProperty(value = "附加信息，格式为 JSON 字符串，用于存储设备的额外属性", example = "{\"key\":\"value\"}")
    private String extraInfo;

    @ApiModelProperty(value = "记录创建时间", example = "2023-01-01 10:00:00")
    private Timestamp createTime;

    @ApiModelProperty(value = "逻辑删除标记，0 为存在，1 为删除", example = "0")
    private Integer deleted;

    @ApiModelProperty(value = "区域路径，表示设备所在的区域", example = "/区域A/区域B")
    private String areaPath;

    @ApiModelProperty(value = "设备制造商", example = "海康威视")
    private String manufacture;

    @ApiModelProperty(value = "设备通道数", example = "16")
    private Integer channelCount;

    @ApiModelProperty(value = "设备类型，如NVR、IPC等", example = "IPC")
    private String deviceType;

    @ApiModelProperty(value = "设备状态，如在线或离线", example = "OFFLINE")
    private String deviceStatus;

    @ApiModelProperty(value = "设备描述信息", example = "这是一台摄像头设备")
    private String description;

    @ApiModelProperty(value = "平台类型，如GB/T 28181-2016", example = "GB/T 28181-2016")
    private String platformType;

    @ApiModelProperty(value = "国标设备ID", example = "34020000001320000001")
    private String gbDeviceId;

    @ApiModelProperty(value = "关联的区域 ID", example = "10")
    private Long areaId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}